home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 003 / db2ios.arc / EDIT.SIG < prev    next >
Encoding:
Text File  |  1983-01-04  |  5.0 KB  |  179 lines

  1. * edit.sig 08/18/83
  2. STORE CHR(PEEK (063)) TO dr
  3. STORE # TO rec:number
  4. * for speed - eliminate the index during edit
  5. SET INDEX TO
  6. * why edit a record to be deleted - so bring it back
  7. RECALL
  8. STORE order TO morder
  9. STORE comp TO mcomp
  10. STORE lname TO mlname
  11. STORE fname TO mfname
  12. STORE addr1 TO maddr1
  13. STORE addr2 TO maddr2
  14. STORE addr3 TO maddr3
  15. STORE city TO mcity
  16. STORE state TO mstate
  17. STORE zip TO mzip
  18. STORE vol1 TO mvol1
  19. STORE amt TO mamt
  20. STORE entered TO mentered
  21. STORE shipped TO mshipped
  22. STORE rem1 TO mrem1
  23. STORE rem2 TO mrem2
  24. STORE bo TO mbo
  25. STORE catalog TO mcatalog
  26. STORE bo:ship TO mbo:ship
  27. STORE bo2:ship TO mbo2:ship
  28. STORE dayu TO mdayu
  29. ERASE
  30. STORE 'Edit Order Module' TO mode
  31. STORE 'Enter the new or corrected information' TO prompt1
  32. STORE ' ' TO prompt2
  33. STORE "Control 'Q' to end edit session" TO prompt3
  34. @  1,25 SAY mode
  35. @  2, 0 SAY "+---------------------------------------"
  36. @  2,39 SAY "---------------------------------------+"
  37. @  3, 5 SAY "ORDER NUMBER "
  38. @  3,43 SAY "Complete "
  39. @  4, 8 SAY "Last name "
  40. @  4,46 SAY "First "
  41. @  5,10 SAY "Address "
  42. @  6, 9 SAY "(line 2) "
  43. @  7, 9 SAY "(line 3) "
  44. @  8,13 SAY "City "
  45. @  8,46 SAY "State "
  46. @  8,65 SAY "ZIP "
  47. @ 10, 2 SAY "Volumes "
  48. @ 12, 3 SAY "Amount "
  49. @ 12,46 SAY "Enter "
  50. @ 12,64 SAY "Ship "
  51. @ 13, 2 SAY "Remarks "
  52. @ 14, 2 SAY "Remarks "
  53. @ 16, 0 SAY "Backorder "
  54. @ 17,44 SAY "Catalog "
  55. @ 18, 2 SAY "Shipped "
  56. @ 18,26 SAY "Shipped "
  57. @ 18,62 SAY "Update "
  58. @ 19, 0 SAY "+---------------------------------------"
  59. @ 19,39 SAY "---------------------------------------+"
  60. @ 20,12 SAY prompt1
  61. @ 21,12 SAY prompt2
  62. @ 22,12 SAY prompt3
  63. @  3,19 GET morder picture '999999999'
  64. @  4,19 GET mlname
  65. @  4,53 GET mfname
  66. @  5,19 GET maddr1
  67. @  6,19 GET maddr2
  68. @  7,19 GET maddr3
  69. @  8,19 GET mcity
  70. @  8,53 GET mstate picture '!!'
  71. @  8,70 GET mzip picture '99999'
  72. @ 10,11 GET mvol1
  73. @ 12,11 GET mamt
  74. @ 12,53 GET mentered picture '99/99/99'
  75. @ 12,70 GET mshipped picture '99/99/99'
  76. @ 13,11 GET mrem1
  77. @ 14,11 GET mrem2
  78. @ 16,11 GET mbo
  79. @ 17,53 GET mcatalog picture '!'
  80. @ 18,11 GET mbo:ship picture '99/99/99'
  81. @ 18,35 GET mbo2:ship picture '99/99/99'
  82. @ 18,70 GET mdayu picture '99/99/99'
  83. @  3,53 GET mcomp picture '!'
  84. READ
  85. CLEAR GETS
  86. * put your editing routines here
  87. DO CASE
  88.     CASE .NOT. (mcomp = 'Y' .OR. mcomp = 'N')
  89.         STORE t TO error
  90.     CASE .NOT. (mcatalog = 'Y' .OR. mcatalog = 'N' .OR. mcatalog = 'B')
  91.         STORE t TO error
  92.     OTHERWISE
  93.         STORE f TO error
  94. ENDCASE
  95. IF error
  96.     @ 01,00
  97.     @ 20,00
  98.     @ 21,00
  99.     @ 22,00
  100.     @ 1,18 SAY 'Please Correct the Indicated Data'
  101.     STORE t to an:error
  102.     DO WHILE an:error
  103.         DO CASE
  104.             CASE  .NOT. (mcomp = 'Y' .OR. mcomp = 'N')
  105.                 @ 21,15 SAY 'Must answer "Y" or "N" if shipping completed                '
  106.                 @  3,53 GET mcomp picture '!'
  107.                 READ
  108.             CASE .NOT. (mcatalog = 'Y' .OR. mcatalog = 'N' .OR. mcatalog = 'B')
  109.                 @ 22,15 SAY 'Enter either "Y", "N" or "B" (backorder)'
  110.                 @ 17,53 GET mcatalog picture '!'
  111.                 READ
  112.             OTHERWISE
  113.                 STORE f TO an:error
  114.         ENDCASE
  115.     ENDDO while an:error
  116. ENDIF error
  117. STORE 'N' TO command
  118. @ 20,00
  119. @ 21,00
  120. @ 22,00
  121. @ 21,15 SAY 'Are there any more changes ?                        '
  122. @ 21,48 GET command picture '!'
  123. READ
  124. IF command = 'Y'
  125.     @  3,19 GET morder picture '9999'
  126.     @  4,19 GET mlname
  127.     @  4,53 GET mfname
  128.     @  5,19 GET maddr1
  129.     @  6,19 GET maddr2
  130.     @  7,19 GET maddr3
  131.     @  8,19 GET mcity
  132.     @  8,53 GET mstate picture '!!'
  133.     @  8,70 GET mzip picture '99999'
  134.     @ 10,11 GET mvol1
  135.     @ 12,11 GET mamt
  136.     @ 12,53 GET mentered picture '99/99/99'
  137.     @ 12,70 GET mshipped picture '99/99/99'
  138.     @ 13,11 GET mrem1
  139.     @ 14,11 GET mrem2
  140.     @ 16,11 GET mbo
  141.     @ 17,53 GET mcatalog picture '!'
  142.     @ 18,11 GET mbo:ship picture '99/99/99'
  143.     @ 18,35 GET mbo2:ship picture '99/99/99'
  144.     @ 18,70 GET mdayu picture '99/99/99'
  145.     @  3,53 GET mcomp picture '!'
  146.     READ
  147.     CLEAR GETS
  148. ENDIF command = 'Y'
  149. REPLACE order WITH morder, comp WITH mcomp 
  150. REPLACE lname WITH mlname, fname WITH mfname
  151. REPLACE addr1 WITH maddr1, addr2 WITH maddr2, addr3 WITH maddr3
  152. REPLACE city WITH mcity, state WITH mstate, zip WITH mzip
  153. REPLACE vol1 WITH mvol1
  154. REPLACE amt WITH mamt
  155. REPLACE entered WITH mentered
  156. REPLACE shipped WITH mshipped, rem1 WITH mrem1, rem2 WITH mrem2
  157. REPLACE bo WITH mbo, catalog WITH mcatalog, bo:ship WITH mbo:ship
  158. REPLACE bo2:ship WITH mbo2:ship
  159. STORE 'Y' TO command
  160. @ 20,00
  161. @ 21,00
  162. @ 22,00
  163. @ 21,12 SAY 'Do You want to UpDate to Todays Date (Y/N) ?'
  164. @ 21,57 GET command PICTURE '!'
  165. READ
  166. IF command = 'Y'
  167.     REPLACE dayu WITH  DATE()
  168. ELSE
  169.     REPLACE dayu WITH mdayu         
  170. ENDIF
  171. @ 23,0 SAY 'Hit RETURN to Continue'
  172. SET CONSOLE OFF
  173. SET INDEX TO &dr.:orders
  174. SET CONSOLE ON
  175. RELEASE ALL
  176. STORE '?' TO command
  177. STORE t TO more
  178. STORE t TO first
  179.